
import 'package:flutter/cupertino.dart';

///IM相关的配置信息,更多菜单
class TimConfig {
  ///更多操作菜单
  var _moreMenus = List<Widget>.empty(growable: true);

  factory TimConfig() => _getInstance();

  static TimConfig get instance => _getInstance();
  static TimConfig? _instance;

  static TimConfig _getInstance() {
    if (_instance == null) {
      _instance = TimConfig._internal();
    }
    return _instance!;
  }

  TimConfig._internal();

  ///设置更多菜单
  void setMoreMenus(List<Widget> menus) {
    _moreMenus.clear();
    _moreMenus.addAll(menus);
  }

  ///获取配置的更多菜单
  List<Widget> getMoreMenus() {
    return _moreMenus;
  }
}
